<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./vue.js">
    </script>
</head>

<body>
    <div id="app">
        <!-- v-if指令将根据表达式seen的值(true or false)来决定是否插入P元素 -->
        <p v-if="seen">现在你能看到我了</p>
    </div>

    <script>
        let app = new Vue({
            el: '#app',
            data: {
                seen: true //true or false
            }
        })
    </script>
</body>

<body>
    <div id="app1">
        <!-- 参数在指令后以冒号指明，例如 v-bind指令用来响应的更新HTML属性 -->
        <pre><a v-bind:href="url">百度</a></pre>
    </div>

    <script>
        new Vue({
            el: "#app1",
            data: {
                url: "http://www.baidu.com"
            }
        })
    </script>
</body>

</html>z